package com.bidevalution.controller.api;

import com.bidevalution.business.service.BeMethodReportService;
import com.bidevalution.dao.entity.BeMethodReport;
import com.qtp.core.model.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/beMethodReport")
@Api(tags = "环节配置报表模板管理")
public class BeMethodReportController {
    @Autowired(required = false)
    BeMethodReportService beMethodReportService;
    @ApiOperation(value = "查询环节布局详细信息", notes = "根据主键查询环节布局详细信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "methodId", value = "方法Id", required = true, dataType = "String", paramType = "query")})
    @PostMapping("/getMethodReport")
    public Response<List<BeMethodReport>> getMethodReport(@RequestParam("methodId") String methodId) {
        return Response.ok(beMethodReportService.getMethodReportByMethodId(methodId));
    }
}
